package com.kl.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;
import java.util.Date;

import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.springframework.format.annotation.DateTimeFormat;

/**
 * <p>
 * 
 * </p>
 *
 * @author author
 * @since 2021-10-29
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("logistics_store")
@ApiModel(value="LogisticsStore对象", description="")
public class LogisticsStore  extends Model<LogisticsStore> implements Serializable{

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "网点地址id")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;

    @ApiModelProperty(value = "网点名称")
    @TableField("store_name")
    private String storeName;

    @ApiModelProperty(value = "网点电话")
    @TableField("store_phone")
    private String storePhone;

    @ApiModelProperty(value = "网点地址")
    @TableField("store_addr")
    private String storeAddr;

    @ApiModelProperty(value = "网点业务(发货 快递派送 快递自提)")
    @TableField("business")
    private String business;

    @ApiModelProperty(value = "县(区)id")
    @TableField("county_id")
    private Long countyId;

    @ApiModelProperty(value = "市")
    @TableField("city_id")
    private Long cityId;

    @ApiModelProperty(value = "省")
    @TableField("province_id")
    private Long provinceId;

    @ApiModelProperty(value = "逻辑删除(0未删除,1已删除)")
    @TableField("deleted")
    //逻辑删除注解(可以设置他的值)一般设置全局的配置就好了
    @TableLogic
    private Integer deleted;

    @ApiModelProperty(value = "版本号")
    @TableField("version")
    private Integer version;

    //自动填充 1.DEFAULT 默认不处理 2.INSERT 插入时填充 3.UPDATE 更新时填充 4.INSERT_UPDATE 插入和更新时填充
    @TableField(value = "create_time",fill = FieldFill.INSERT)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;

    @TableField(value = "update_time",fill = FieldFill.UPDATE)
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;

    @ApiModelProperty(value = "配送范围")
    @TableField("distribution_scope")
    private String distributionScope;

    @ApiModelProperty(value = "是否授权(0未授权,1已授权,2权限收回)")
    @TableField("site_role")
    private Integer siteRole;

    @ApiModelProperty(value = "是否是物流仓库(0不是仓库,1是物流仓库)")
    @TableField("if_warehouse")
    private Integer ifWarehouse;


}
